<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
	<!--
		Proof of concept for Ajax technology.
		Should work in IW, Safari, Mozilla's and Opera 8+.
		$Id: ajax-2.html,v 1.2 2006/05/15 11:52:53 justb Exp $
	   -->
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

	<title>Ajax Demo</title>

	<link href="assets/style.css" rel="stylesheet">
	<script src="js/jquery/jquery-1.6.1.min.js"></script>
	<script type="text/javascript" src="js/pushlet/js-pushlet-client.js"></script>
 	<script type="text/javascript" src="js/pushlet/api.js"></script>
 	<script src="js/operamasks/ui/jquery.ui.core.js"></script>

    <script src="js/operamasks/ui/jquery.ui.widget.js"></script>

    <script src="js/operamasks/ui/om-messagetip.js"></script>

    <link rel="stylesheet" href="js/operamasks/themes/default/om-all.css">
 	
	<script type="text/javascript"><!--

	// Pushlet Event Callback from Server
	function onData(event) {
		pr(event.toString());
		var msg=event.get("message");
		if(msg){
			pr(msg);
			 $.omMessageTip.show({
            	title : '新闻',
            	content : msg
        	 });
		}
	}
	
	function init() {
		initDHTML();
		pr('joinListen...');
		//PL.joinListen('/pushlet/ping');
		p_join_listen('/CometDemo/TestRate');
	}

	function leave() {
		pr('leaving...');
	}

	// Print util
	function pr(aString) {
		document.disp.event.value = aString;
	}

	//-->
	</script>

</head>

<body onload="init()">

<form name="disp">
	<table border="2" bordercolor="white" cellpadding="4" cellspacing="0">
		<tr>
			<td>
				<textarea cols="60" rows="16" name="event">
					NO DATA (idle)
				</textarea>
			</td>
		</tr>
	</table>
</form>
<script type="text/javascript">p_embed()</script>
</body>
</html>
